﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using 基于WPF的电缆采样数据分析系统.Tools.LangugeTool;

namespace 基于WPF的电缆采样数据分析系统.Converters
{
    /// <summary>
    /// 来源名称转换器
    /// </summary>
    public class SourceNameConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string channelInfo = "";

            switch ((int)value)
            {
                case 1:
                    channelInfo = LangugeConvertor.GetValue("InitialChannelOne");
                    break;
                case 2:
                    channelInfo = LangugeConvertor.GetValue("InitialChannelTwo");
                    break;
                case 3:
                    channelInfo = LangugeConvertor.GetValue("InitialChannelThree");
                    break;
                case 4:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformOne");
                    break;
                case 5:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformTwo");
                    break;
                case 6:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformThree");
                    break;
                case 7:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformFour");
                    break;
                case 8:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformFive");
                    break;
                case 9:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformSix");
                    break;
                case 10:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformSeven");
                    break;
                case 11:
                    channelInfo = LangugeConvertor.GetValue("ReferenceWaveformEight");
                    break;
            }

            return channelInfo;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
